//package com.navinfo.opentsp.platform.computing.analysis.application;
//
//import org.apache.spark.sql.Dataset;
//import org.apache.spark.sql.Row;
//import org.apache.spark.sql.SparkSession;
//
//public class SparkReadWriteDemo {
//
//    public static void main(String[] args) {
//        SparkSession spark = SparkSession
//                .builder()
//                .appName("SparkReadWriteDemo")
//                .config("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
//                .enableHiveSupport()
//                .getOrCreate();
//        String day = args[0];
//        String path = args[1];
//        String sql = "select tid,ispatch,mileage,status,gpsdate,height,latitude,longitude,statusaddition from navinfo_parquet_0200 where part_time = %s";
//        Dataset<Row> data = spark.sql(String.format(sql, day));
//        data.repartition(1).write().parquet(path);
//    }
//}
